<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveSupport::CoreExtensions::Hash::Conversions</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveSupport::CoreExtensions::Hash::Conversions</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions_rb.html">
                vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>


  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">XML_TYPE_NAMES</td>
          <td>=</td>
          <td class="context-item-value">{           &quot;Symbol&quot;     =&gt; &quot;symbol&quot;,           &quot;Fixnum&quot;     =&gt; &quot;integer&quot;,           &quot;Bignum&quot;     =&gt; &quot;integer&quot;,           &quot;BigDecimal&quot; =&gt; &quot;decimal&quot;,           &quot;Float&quot;      =&gt; &quot;float&quot;,           &quot;Date&quot;       =&gt; &quot;date&quot;,           &quot;DateTime&quot;   =&gt; &quot;datetime&quot;,           &quot;Time&quot;       =&gt; &quot;datetime&quot;,           &quot;TrueClass&quot;  =&gt; &quot;boolean&quot;,           &quot;FalseClass&quot; =&gt; &quot;boolean&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">XML_FORMATTING</td>
          <td>=</td>
          <td class="context-item-value">{           &quot;symbol&quot;   =&gt; Proc.new { |symbol| symbol.to_s },           &quot;date&quot;     =&gt; Proc.new { |date| date.to_s(:db) },           &quot;datetime&quot; =&gt; Proc.new { |time| time.xmlschema },           &quot;binary&quot;   =&gt; Proc.new { |binary| Base64.encode64(binary) },           &quot;yaml&quot;     =&gt; Proc.new { |yaml| yaml.to_yaml }</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">XML_PARSING</td>
          <td>=</td>
          <td class="context-item-value">{             &quot;symbol&quot;       =&gt; Proc.new  { |symbol|  symbol.to_sym },             &quot;date&quot;         =&gt; Proc.new  { |date|    ::Date.parse(date) },             &quot;datetime&quot;     =&gt; Proc.new  { |time|    ::Time.parse(time).utc },             &quot;integer&quot;      =&gt; Proc.new  { |integer| integer.to_i },             &quot;float&quot;        =&gt; Proc.new  { |float|   float.to_f },             &quot;decimal&quot;      =&gt; Proc.new  { |number|  BigDecimal(number) },             &quot;boolean&quot;      =&gt; Proc.new  { |boolean| %w(1 true).include?(boolean.strip) },             &quot;string&quot;       =&gt; Proc.new  { |string|  string.to_s },             &quot;yaml&quot;         =&gt; Proc.new  { |yaml|    YAML::load(yaml) rescue yaml },             &quot;base64Binary&quot; =&gt; Proc.new  { |bin|     Base64.decode64(bin) },             # FIXME: Get rid of eval and institute a proper decorator here             &quot;file&quot;         =&gt; Proc.new do |file, entity|               f = StringIO.new(Base64.decode64(file))</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>